#pragma once

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <string>
#include "my_stack.h"

using namespace std;


int main(){

	setlocale(LC_ALL, "swedish");
	
	int num = 1628;

	my_stack ms;

	while (num / 16 > 1){
		ms.push(num % 16);
		num = num / 16;
	}
	ms.push(num % 16);

	for (auto it = ms.begin(); it != ms.end(); it++){
		if (it->value == 10){
			cout << "a";
		}
		else if (it->value == 11){
			cout << "b";
		}
		else if (it->value == 12){
			cout << "c";
		}
		else if (it->value == 13){
			cout << "d";
		}
		else if (it->value == 14){
			cout << "e";
		}
		else if (it->value == 15){
			cout << "f";
		}
		else{
			cout << it->value;
		}
	}

	cout << endl;

			

	system("pause");
	return 0;
}


